home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / bildschirmschoner / blitzblank_2.60 / developer / blitzblank.h < prev    next >
C/C++ Source or Header  |  1996-04-07  |  7KB  |  149 lines

  1. #ifndef BLITZBLANK_H
  2. #define BLITZBLANK_H
  3.  
  4. #include <exec/ports.h>
  5. #include <exec/tasks.h>
  6.  
  7.  
  8. /****************************************/
  9. /* $VER: BlitzBlank.h 2.60 (12.05.95)   */
  10. /****************************************/
  11.  
  12. /********************************/
  13. /* Stuff for blitzblank.library */
  14. /********************************/
  15.  
  16. #define BLITZBLANKLIB_VER 9
  17.  
  18. extern struct BitMap   *BBL_AllocBitMap        (ULONG width,ULONG height,ULONG depth,ULONG flags);
  19. extern struct BitMap   *BBL_AllocDBufBitMap    (struct Screen *screen);
  20. extern struct RastPort *BBL_AllocRastPort      (ULONG width,ULONG height,ULONG depth,ULONG flags);
  21. extern void             BBL_BlankDone          (void);
  22. extern struct Window   *BBL_BlankMouse         (struct Screen *screen,UBYTE mode);
  23. extern struct Screen   *BBL_CloneFirstScreen   (UWORD moredepth,ULONG flags);
  24. extern void             BBL_CloseScreenSafe    (struct Screen *screen);
  25. extern BOOL             BBL_CopyOriginalColors (struct Screen *screen);
  26. extern BOOL             BBL_CopyOriginalScreen (struct Screen *screen);
  27. extern void             BBL_EndDBuf            (ULONG handle);
  28. extern BOOL             BBL_FadeDown           (struct Screen *screen,UBYTE final,UBYTE delay);
  29. extern void             BBL_FreeBitMap         (struct BitMap *bitmap);
  30. extern void             BBL_FreeRastPort       (struct RastPort *rastport);
  31. extern long             BBL_GetDarkestPen      (struct Screen *screen);
  32. extern char*            BBL_GetString          (UWORD num,char *text);
  33. extern ULONG            BBL_InitDBuf           (struct Screen *screen,struct BitMap *bitmap);
  34. extern void             BBL_ModuleRunning      (void);
  35. extern void             BBL_RainbowPalette     (struct Screen *screen,ULONG lowreg,ULONG highreg);
  36. extern ULONG            BBL_RemainingTime      (void);
  37. extern BOOL             BBL_ScreenAvailable    (struct Screen *screen);
  38. extern BOOL             BBL_SendMessage        (struct BB_Message *bbmessage,char *portname);
  39. extern void             BBL_ShowBitMap         (struct Screen *screen,struct BitMap *bitmap,ULONG handle);
  40. extern void             BBL_UnBlankMouse       (struct Window *window);
  41.  
  42.  
  43. /*******************************************************************/
  44. /* The different kinds of GUI-objects for a module's config-window */
  45. /*******************************************************************/
  46.  
  47. #define BB_PGroup     1 /* Indicates the start of a new page group */
  48. #define BB_PGroup_End 2 /* Indicates the end of the page group */
  49. #define BB_VGroup     3 /* Indicates the start of a new vertical group */
  50. #define BB_VGroup_End 4 /* Indicates the end of the vertical group */
  51. #define BB_Check      5 /* Checkmark, uses set field in BB_Object */
  52. #define BB_String     6 /* Textgadget, uses max/contents fields in BB_Object */
  53. #define BB_File       7 /* Stringgadget with attached filerequester */
  54. #define BB_Slider     8 /* Slidergadget, uses min/max/set fields in BB_Object */
  55. #define BB_Cycle      9 /* Cyclegadget, uses set/contents in BB_Object */
  56. #define BB_Dummy     10 /* Dummy, if you want no gadgets at all */
  57. #define BB_Font      11 /* Stringgadget with attached fontrequester */
  58. #define BB_Dir       12 /* Stringgadget with attached filerequester, Dirs only */
  59.  
  60. /*****************************************/
  61. /* Flags used in BB_Message's flag-field */
  62. /*****************************************/
  63.  
  64. #define BBF_Screenmode   (1L <<  0)  /* Allows screenmode-selection */
  65. #define BBF_Colors       (1L <<  1)  /* Allows screendepth-selection */
  66. #define BBF_Sample       (1L <<  2)  /* Not supported yet */
  67. #define BBF_NoWatch      (1L <<  3)  /* Eats no CPU-time, so needs no checking */
  68. #define BBF_NoScreen     (1L <<  4)  /* Wants no screen from BlitzBlank */
  69. #define BBF_FirstScreen  (1L <<  5)  /* Wants pointer to screen in front, be CAREFUL with this! */
  70. #define BBF_CloneScreen  (1L <<  6)  /* Wants a clone from the FrontScreen */
  71. #define BBF_AmigaOnly    (1L <<  7)  /* Not supported yet */
  72. #define BBF_NoMouseBlank (1L <<  8)  /* No mouseblanking from BlitzBlank wanted */
  73. #define BBF_NoKeyPass    (1L <<  9)  /* No keypassing necessary (no mouseblanking, no own active window */
  74. #define BBF_BigWindow    (1L << 10)  /* The blankwindow fills the whole screen */
  75. #define BBF_Interleaved  (1L << 11)  /* BlitzBlank TRIES to give you a screen with an Interleaved BitMap */
  76.  
  77.  
  78. /*****************************************/
  79. /* The structure, that holds config-data */
  80. /*****************************************/
  81.  
  82. struct BB_Object
  83. {
  84.   struct BB_Object* next;     /* Pointer to next object or NULL if last object */
  85.   WORD              type;     /* What kind of GUI-object this is */
  86.   long              min;      /* Minimum value for BB_Slider */
  87.   long              max;      /* Maximum value for BB_Slider, max length of BB_String */
  88.   long              set;      /* Value of BB_Slider, state of BB_Checkmark, BB_Cycle */
  89.   char             *contents; /* Pointer to buffer for BB_String, pointer to stringarray for BB_Cycle */
  90.   char             *label;    /* Label for ALL objects */
  91. };
  92.  
  93.  
  94. /*****************************************************/
  95. /* The message to send to BlitzBlank/BlitzBlankPrefs */
  96. /*****************************************************/
  97.  
  98. struct BB_Message
  99. {
  100.   struct Message    msg;        /* Normal Exec-Message-structure */
  101.   long              flags;      /* Flags for this module */
  102.   char             *infotext;   /* Pointer to infotext for this module */
  103.   struct BB_Object *first;      /* Pointer to first BB_Object or NULL for Info-action */
  104.   WORD              modpri;     /* not of use, if you use the library */
  105.   char             *path;       /* Path to directory for module-data */
  106.   struct Task      *blitzblank; /* not of use, if you use the library */
  107. };
  108.  
  109.  
  110. /***************************************/
  111. /* The BlitzBlank-Screeninfo-structure */
  112. /***************************************/
  113.  
  114. struct BB_Screeninfo
  115. {
  116.   WORD             xpos;       /* should be 0 */
  117.   WORD             ypos;       /* should be 0 */
  118.   WORD             width;      /* User-selected screen-width */
  119.   WORD             height;     /* User-selected screen-height */
  120.   WORD             depth;      /* User-selected screen-depth */
  121.   long             mode;       /* User-selected screen-mode */
  122.   struct Screen   *bbscreen;   /* module screen */
  123.   struct Window   *bbwindow;   /* blank window */
  124.   WORD             mindepth;   /* desired minimum depth or 0 */
  125.   WORD             maxdepth;   /* desired maximum depth or 0 */
  126.   WORD             xpixelsize; /* X-size of the pixels */
  127.   WORD             ypixelsize; /* Y-size of the pixels */
  128.   /* If you have a given width of something and want to            */
  129.   /* calculate the aspect-correct height, then do:                 */
  130.   /* height=width*screeninfo->xpixelsize/screeninfo->ypixelsize;   */
  131. };
  132.  
  133.  
  134. /**************************************************************/
  135. /* Flag-definition for BBL_AllocBitMap()/BBL_AllocRastPort(), */
  136. /* if you don't have the V39-includes                         */
  137. /**************************************************************/
  138.  
  139. #ifndef BMB_CLEAR
  140. #define BMB_CLEAR 0
  141. #define BMB_DISPLAYABLE 1
  142. #define BMB_INTERLEAVED 2
  143. #define BMF_CLEAR (1l<<BMB_CLEAR)
  144. #define BMF_DISPLAYABLE (1l<<BMB_DISPLAYABLE)
  145. #define BMF_INTERLEAVED (1l<<BMB_INTERLEAVED)
  146. #endif
  147.  
  148. #endif
  149.